package com.acme.bankapp.service.bank;

/**
 * Class which represents Account functional
 * 
 * @author render1980
 *
 */
public class SavingAccount extends AbstractAccount {
	public SavingAccount(final double amount) {
		super(amount);
		this.balance = amount;
	}
	
	public void withdraw(double x) {
		if(balance >= x) {
			balance -= x;
			return;
		}
		System.out.println("Not enough money!");
	}
	
	public double maximumAmountToWithdraw() {
		return this.balance;
	}
}